<!DOCTYPE html>
<html>
<head>
	<title>Login</title>
	<meta charset="utf-8">
	<link rel="stylesheet" type="text/css" href="/static/css/login.css">
    <script type="text/javascript">
    	function judge_login_data(argument){
    		 location.href='/index'

    	}
    </script> 
</head>
<body>
<div id="content">
			<div id="box">
				<div class="title">Login</div>
				<div class="input">
					<input type="text" id="username" value="" placeholder="用户名" />
					<br>
					<input type="password" id="password" placeholder="密码" />
					<br>
					<input type="password" id="password1" placeholder="再次输入" />
					<br>
					<input type="submit" name="submit" id="submit_btn" value="登录" onclick="judge_login_data()">
					
				</div>
			</div>
		</div>

	</body>
	<script type="text/javascript">
		function getuser() {
			var username = document.getElementById("username").value;
			var password = document.getElementById("password").value;
			var password1 = document.getElementById("password1").value;
			testing(username, password,password1)
			//alert("username:"+username+"\n"+"password:"+password);
		}

		function testing(username, password, password1) {
			var tmp = username && password;
			if (tmp == "") {
				alert("请填写完整信息");
				return 0;
			}
			if (username.length < 4 || username.length > 16) {
				alert("用户名长度为：4-16位")
				return 0;
			} 
			if (password<8 || password1<24)
			{
				alert("密码长度错误");
			}else if(password == password1){
				alert("username:" + username + "\n" + "password:" + password);
			}else{
				alert("两次输入的密码不一样");
			}
		}
	</script>



</body>
</html>